<?php
/**
 * Acl\Acl
 * 
 * @autor: Mamy RAKOTONRINA
 */

namespace Administrator\Acl;

use Zend\Permissions\Acl\Acl;
use Zend\Permissions\Acl\GenericRole as Role;
use Zend\Permissions\GenericResource as Resource;

class Acl extends Acl {
    public function __construct($config) {
        // Add some roles
        $this->addRole(new Role('guest'));
        $this->addRole(new Role('member'));
        $this->addRole(new Role('admin'));
        
        // Get all resources
        $controllers = $config['controllers']['invokables'];
        
        // Add some resources
        $this->addResource(new Resource('index'));
        
        // Attrib the resources to roles
        //$this->allow('guest', 'index');
    }
}
